package com.imooc.distributedemo.resume.aboutCopy;

import org.springframework.beans.BeanUtils;

public class CopyClient {
    public static void main(String[] args) {
        MyUser user = new MyUser("jessie","123");
        user.setAddress(new MyAddress("hubei","wuhan"));;

        MyUser newUser = new MyUser();
        BeanUtils.copyProperties(user,newUser);

        System.out.println(user==newUser);
        System.out.println(user.getAddress() +"==="+ newUser.getAddress());
        System.out.println(user.getAddress()==newUser.getAddress());
    }
}
